#pragma once

#include <gofcl_usbfs_r.h>

typedef struct {
	u32_s TOC : 3;
	u32_s : 5;
	u32_s SRPCEN : 1;
	u32_s HNPCEN : 1;
	u32_s UTT : 4;
	u32_s : 15;
	u32_s FHM : 1;
	u32_s FDM : 1;
	u32_s : 1;
} usbfs_gusbcs_s;

_Static_assert(sizeof(usbfs_gusbcs_s) == 4,
	       "Struct usbfs_gusbcs_s defined error!");

static inline void usbfs_wreg_gusbcs_s(usbfs_gusbcs_s gusbcs) {
	union {
		usbfs_gusbcs_s g;
		u32_s u;
	} gu = {
		.g = gusbcs,
	};
	usbfs_wreg(USBFS_GUSBCS_R, gu.u);
}
